﻿namespace Mvvm.Common
{
    public delegate bool ShowDialogedHandel(string message, string caption, string okButtonStr);
    public class DialogModel
    {
        public event ShowDialogedHandel ShowDialoged;
        /// <summary>
        /// 显示消息
        /// </summary>
        /// <param name="message"></param>
        /// <param name="caption"></param>
        /// <param name="okButtonStr"></param>
        /// <returns></returns>
        public bool ShowDialog(string message, string caption="提示", string okButtonStr="确定")
        {
            if (ShowDialoged == null) return true;
            return ShowDialoged(message, caption, okButtonStr);
        }
    }
}